# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Ben <contrasutra@myrealbox.com>

pkgname=sound-juicer
pkgver=3.38.0+r27+g9f97ca1f
pkgrel=1
pkgdesc="A lean and friendly audio CD extractor for GNOME"
url="https://wiki.gnome.org/Apps/SoundJuicer"
arch=(x86_64)
license=(GPL)
depends=(libmusicbrainz5 libdiscid gtk3 gst-plugins-base gst-plugins-good
         brasero iso-codes libcanberra)
makedepends=(itstool appstream-glib git meson)
_commit=9f97ca1faca396099f52264a9729aa355f8d122e  # master
source=("git+https://gitlab.gnome.org/GNOME/sound-juicer.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}
